<!DOCTYPE html>
<html lang="zh-CN">
<style type="text/css">
    .title4 {
        color: #fafafa;

        letter-spacing: 0;

        font-size: 50px;

        text-shadow: 0px 1px 0px #999, 0px 2px 0px #888, 0px 3px 0px #777, 0px 4px 0px #666, 0px 5px 0px #555, 0px 6px 0px #444, 0px 7px 0px #333, 0px 8px 7px #001135;

    }

    .box {
        background-color: #FFF;
        border-radius: 5px;
        border: 1px solid #DDD;
        padding: 30px 20px;
        margin: 50px 10% 20px 10%;
        width: 80%;
        height: 600px;
        text-align: center;

    }

    .box:hover {
        box-shadow: 0 0 5px 3px #CCC;
    }

    .table11_7 table {
        width: 100%;
        margin: 15px 0;
        border: 0;
    }

    .table11_7 th {
        background-color: #00A5FF;
        color: #FFFFFF
    }

    .table11_7,
    .table11_7 th,
    .table11_7 td {
        font-size: 0.95em;
        text-align: center;
        padding: 4px;
        border-collapse: collapse;
    }

    .table11_7 th,
    .table11_7 td {
        border: 1px solid #2087fe;
        border-width: 1px 0 1px 0;
        border: 2px inset #ffffff;
    }

    .table11_7 tr {
        border: 1px solid #ffffff;
    }

    .table11_7 tr:nth-child(odd) {
        background-color: #aae1fe;
    }

    .table11_7 tr:nth-child(even) {
        background-color: #ffffff;
    }
</style>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>评论审核</title>

    <link rel="stylesheet" href="../../Public/Css/index.css">
</head>

<body>


    <nav class="navbar">
        <div class="container navbar-content">
            <ul id="menu">
                <li>
                    <a href=""> 首页</a>
                </li>
                <li>
                    <a href=""> 排行</a>
                </li>
                <li>
                    <a href=""> 分类浏览</a>
                </li>
                <li>
                    <a href=""> 所有新闻</a>
                </li>
                <li>
                    <a href=""> 所有新闻</a>
                </li>
        </div><!-- /.container-fluid -->
    </nav>
    <h1 align="center" class="title4">&nbsp;&nbsp;&nbsp;新闻发布系统</h1>
        <div class="box">
    <h2>评论审核</h2>
    <form action="./Check_C.php" method="POST">
        <?php
        include_once("../../Functions/connectDatabase.php");
        get_connection();
        $id = $_REQUEST["id"];
        $sql = "SELECT * FROM review WHERE review_id='$id'";
        $result = mysqli_query($conn, $sql);
        if (mysqli_num_rows($result) > 0) {
            $row = mysqli_fetch_assoc($result);
            echo "内容：" . $row['review_content'] . "<br><br>";
            echo "发表时间：" . $row['review_publish_time'] . "<br><br>";
            $sql = "SELECT user_name FROM users WHERE user_id='" . $row['user_id'] . "'";
            $result = mysqli_query($conn, $sql);
            $r1 = mysqli_fetch_assoc($result);
            echo "发布者：" . $r1['user_name'] . "<br><br>";
            $sql = "SELECT news_title FROM news WHERE news_id='".$row["news_id"]."'";
            $result = mysqli_query($conn, $sql);
            $r2 = mysqli_fetch_assoc($result);
            echo "所属新闻：<a href=\"../News/newsShow.php?id=".$r2["news_id"]."\">".$r2["news_title"]."</a><br><br>";
            echo "<input type=\"radio\" name=\"state\" value=\"通过\">通过&nbsp&nbsp&nbsp&nbsp&nbsp";
            echo "<input type=\"radio\" name=\"state\" value=\"不通过\">不通过<br><br>";
            echo "备注：<textarea cols=\"50\" rows=\"2\" name=\"remarks\"></textarea><br><br>";
            echo "<input type=\"hidden\" name=\"id\" value=\"$id\">";
            echo "<br><br>";         
        }
        ?>
        <input type="submit" value="提 交" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="重 填" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" onclick="javascript:history.back(-1);">返回上一页</button>
    </form>
        </div>

</body>

</html>